package com.szit.adminserver.dao;

import com.szit.adminserver.entity.AdminUser;
import com.szit.util.vo.AdminUserVo;

import java.util.ArrayList;

public interface AdminUserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(AdminUser record);

    int insertSelective(AdminUser record);

    AdminUser selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(AdminUser record);

    int updateByPrimaryKey(AdminUser record);

    /**
     * 根据用户名查询用户
     * @param username
     * @return
     */
    AdminUser selectByUsername(String username);

    /**
     * 根据token查询用户
     * @param token
     * @return
     */
    AdminUser selectByToken(String token);

    /**
     * 查询所有用户
     * @return
     */
    ArrayList<AdminUser> selectAllUser();

    /**
     * 查询所有用户信息跟权限id
     * @return
     */
    ArrayList<AdminUserVo> selectRoleIdAndAllUser();
}